﻿using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
using System.IO;

namespace AMS.DeDuplicator.CommonLayer
{
    // encapsulate input validation and provide consistency where possible
    public static class InputValidator
    {
        public static void ValidateNotNull(object inputParameter)
        {
            if (inputParameter == null)
                ExceptionHandler.ArgumentNullException();
        }

        public static void ValidateFileExists(string filePath)
        {
            if (filePath == null || !File.Exists(filePath))
                ExceptionHandler.FileNotFoundException();
        }

        public static void ValidateDirectoryExists(string directory)
        {
            if (directory == null || !Directory.Exists(directory))
                ExceptionHandler.DirectoryNotFoundException();
        }
    }
}
